import request from '@/utils/httpRequest'

export function fetchList(query) {
  return request({
    url: request.adornUrl('/shop/shopuser/page'),
    method: 'get',
    params: query
  })
}

export function addShopUserObj(data) {
  return request({
    url: request.adornUrl('/shop/shopuser/saveShopUserObj'),
    method: 'post',
    data: data
  })
}

export function getObj(id) {
  return request({
    url: request.adornUrl('/shop/shopuser/' + id),
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: request.adornUrl('/shop/shopuser/' + id),
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: request.adornUrl('/shop/shopuser'),
    method: 'put',
    data: obj
  })
}

export function getShopUserList(shopId) {
  return request({
    url: request.adornUrl('/shop/shopuser/getShopUserList/' + shopId),
    method: 'get'
  })
}
